package com.ktg.mes.atuoVue;


import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class QueryParam {
    private String name;
    private String modelName;

    /**
     * 查询输入类型 0 input,
     */
    private Integer type;

    private String prop;

    /**
     *
     */
    private String defaultValue;

    public QueryParam(String name,String modelName,ViewType type){
        this.name = name;
        this.modelName = modelName;
        this.type = type.value;
    }

    public QueryParam setProp(String prop) {
        this.prop = prop;
        return this;
    }

    public QueryParam setType(ViewType type) {
        this.type = type.value;
        return this;
    }

    public QueryParam setDefaultValue(String defaultValue){
        this.defaultValue = defaultValue;
        return this;
    }

    public enum ViewType {
        Hidden(-1),InputAll(0),DateDay(100),DateMonth(200);
        private final Integer value;
        ViewType(Integer value)
        {
            this.value = value;
        }
        public Integer value()
        {
            return this.value;
        }
    }


}
